import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
import Layout from '@/layout'

const routes = [
    {
        path: '/',
        // redirect: '/login',
        redirect: '/test/formAssets',
        meta: {authority: [0]},
    }, {
        path: '/login',
        name: 'login',
        meta: {authority: [0]},
        component: () => import(/* webpackChunkName: "login" */ '@/views/login')
    },
    // {
    //     path: '/dashboard',
    //     name: 'dashboard',
    //     component: Layout,
    //     redirect: '/dashboard/index',
    //     meta: {title: '首页', authority: [100], onlyOne: 1, id: 1, icon: 'el-icon-s-home'},
    //     children: [{
    //         path: 'index',
    //         name: 'index',
    //         meta: {title: '首页', authority: [100]},
    //         component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard')
    //     }]
    // }, {
    //     path: '/systemSettings',
    //     name: 'systemSettings',
    //     component: Layout,
    //     redirect: '/systemSettings/index',
    //     meta: {title: '系统设置', authority: [100], id: 88, icon: 'el-icon-setting'},
    //     children: [{
    //         path: 'index',
    //         name: 'index',
    //         meta: {title: '角色设置', authority: [100], id: 89},
    //         component: () => import(/* webpackChunkName: "systemSettings" */ '@/views/systemSettings')
    //     },{
    //         path: 'systemSettings1',
    //         name: 'systemSettings1',
    //         meta: {title: '账号设置', authority: [100], id: 90},
    //         component: () => import(/* webpackChunkName: "systemSettings1" */ '@/views/systemSettings/systemSettings1')
    //     }]
    // },

    {
        path: '/test',
        name: 'test',
        component: Layout,
        redirect: '/test/TestTabs',
        meta: {title: '组件测试', authority: [100], icon: 'el-icon-loading', id: 1},
        children: [
            // {
            //     path: 'commodity1',
            //     name: 'commodity1',
            //     meta: {title: '违约金设置', authority: [100], id: 6},
            //     component: () => import(/* webpackChunkName: "commodity1" */ '@/views/test/commodity1')
            // },{
            //     path: 'distributionStation',
            //     name: 'distributionStation',
            //     meta: {title: '配送站管理', authority: [100], id: 9},
            //     component: () => import(/* webpackChunkName: "distributionStation" */ '@/views/test/distributionStation')
            // },            {
            //     path: 'TestTabs',
            //     name: 'TestTabs',
            //     meta: {title: 'tabs', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "TestTabs" */ '@/views/test/TestTabs')
            // },
            // {
            //     path: 'TestTable',
            //     name: 'TestTable',
            //     meta: {title: 'table', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "TestTable" */ '@/views/test/TestTable')
            // }, {
            //     path: 'TestDialog',
            //     name: 'TestDialog',
            //     meta: {title: 'dialog', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "TestDialog" */ '@/views/test/TestDialog')
            // }, {
            //     path: 'TestTitle',
            //     name: 'TestTitle',
            //     meta: {title: 'TestTitle', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "TestTitle" */ '@/views/test/TestTitle')
            // },
            // {
            //     path: 'TestTitleChild',
            //     name: 'TestTitleChild',
            //     meta: {title: 'TestTitleChild', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "TestTitleChild" */ '@/views/test/TestTitleChild')
            // },
            // {
            //     path: 'test2',
            //     name: 'test2',
            //     meta: {title: '封装demo', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "test2" */ '@/views/test/test2')
            // }, {
            //     path: 'test3',
            //     name: 'test3',
            //     meta: {title: '没封装demo,没做完', authority: [100], id: 20000},
            //     component: () => import(/* webpackChunkName: "test3" */ '@/views/test/test3')
            // },
            {
                path: 'ruoyi',
                name: 'ruoyi',
                meta: {title: '若依生成', authority: [100], id: 2},
                component: () => import(/* webpackChunkName: "ruoyi" */ '@/views/ruoyi')
            },
            {
                path: 'test4',
                name: 'test4',
                meta: {title: '导入生成', authority: [100], id: 2},
                component: () => import(/* webpackChunkName: "test4" */ '@/views/test/test4')
            },
            {
                path: 'analysisGeneration',
                name: 'analysisGeneration',
                meta: {title: '解析生成', authority: [100], id: 3},
                component: () => import(/* webpackChunkName: "analysisGeneration/index" */ '@/views/analysisGeneration/index')
            },
            {
                path: 'test5',
                name: 'test5',
                meta: {title: '代码测试', authority: [100], id: 4},
                component: () => import(/* webpackChunkName: "test5" */ '@/views/test/test5')
            },
            {
                path: 'CiscoAnyconnect',
                name: 'CiscoAnyconnect',
                meta: {title: 'CiscoAnyconnect服务器', authority: [100], id: 5},
                component: () => import(/* webpackChunkName: "CiscoAnyconnect" */ '@/views/CiscoAnyconnect')
            },
            {
                path: 'newServer',
                name: 'newServer',
                meta: {title: '新服务器', authority: [100], id: 6},
                component: () => import(/* webpackChunkName: "CiscoAnyconnect" */ '@/views/newServer')
            },{
                path: 'countingStrokes',
                name: 'countingStrokes',
                meta: {title: '算笔画', authority: [100], id: 6},
                component: () => import(/* webpackChunkName: "countingStrokes" */ '@/views/countingStrokes')
            },{
                path: 'mailboxResolution',
                name: 'mailboxResolution',
                meta: {title: '邮箱解析', authority: [100], id: 6},
                component: () => import(/* webpackChunkName: "mailboxResolution" */ '@/views/mailboxResolution')
            },{
                path: 'formProduction',
                name: 'formProduction',
                meta: {title: '亘川表单生产', authority: [100], id: 6},
                component: () => import(/* webpackChunkName: "formProduction" */ '@/views/test/formProduction')
            },
            {
                path: 'formAssets',
                name: 'formAssets',
                meta: {title: '亘川资产生产', authority: [100], id: 6},
                component: () => import(/* webpackChunkName: "formAssets" */ '@/views/thingsBoard/formAssets')
            },
            {
                path: 'qqChat',
                name: 'qqChat',
                meta: {title: 'qq聊天', authority: [100], id: 6},
                component: () => import(/* webpackChunkName: "qqChat" */ '@/views/test/qqChat')
            }
        ]
    },
    {
        path: '/newCodeProducer',
        name: 'newCodeProducer',
        component: Layout,
        redirect: '/newCodeProducer/index',
        meta: {title: '新代码生成器', authority: [100], onlyOne: 1, id: 7, icon: 'el-icon-s-home'},
        children: [{
            path: 'index',
            name: 'index',
            meta: {title: '新代码生成器', authority: [100]},
            component: () => import(/* webpackChunkName: "newCodeProducer" */ '@/views/newCodeProducer')
        }]
    }

    // {
    //     path: '/business',
    //     name: 'business',
    //     component: Layout,
    //     redirect: '/business/BusinessTable',
    //     meta: {title: '业务组件', authority: [100], icon: 'el-icon-loading', id: 4},
    //     children: [
    //         {
    //             path: 'BusinessTable',
    //             name: 'BusinessTable',
    //             meta: {title: 'BusinessTable', authority: [100], id: 20000},
    //             component: () => import(/* webpackChunkName: "BusinessTable" */ '@/views/business/BusinessTable')
    //         },
    //     ]
    // },

    /*{
        path: '/system',
        name: 'system',
        component: Layout,
        redirect: '/system/company',
        meta: {title: '系统设置', authority: [100], icon: 'el-icon-setting', id: 20000},
        children: [
            {
                path: 'company',
                name: 'company',
                meta: {title: '基础设置', authority: [100], id: 20000},
                component: () => import(/!* webpackChunkName: "systemBasics" *!/ '@/views/system/company')
            },{
                path: 'carousel',
                name: 'carousel',
                meta: {title: '轮播图设置', authority: [100], id: 20000},
                component: () => import(/!* webpackChunkName: "systemCarousel" *!/ '@/views/system/carousel')
            }
        ]
    },*/
]

const router = new VueRouter({
    routes
})
export default router
